home *** CD-ROM | disk | FTP | other *** search
/ Inside Mac Games Volume 3 #11 / IMG 32 Nov 1995.iso / Shareware / 32-bit World Builder / World Builder Info / Writing Adventure Games #2 < prev    next >
Encoding:
Text File  |  1995-05-28  |  14.1 KB  |  247 lines  |  [TEXT/ttxt]

  1. Writing Adventure Games, Part Two
  2.          by Ray Dunakin
  3.  
  4. In this article I want to share some of the things I've learned about creating successful shareware adventure games. Some of these things I've learned from countless hours of watching people play-testing my games. Other things I've learned from talking to people online, or from the letters I've received from gamers around the world. And some is just personal observation.
  5.  
  6. COMMON COMMANDS
  7.  
  8. I've noticed that a lot of shareware adventures suffer from variations in the commands that the player uses to play the game. Commands should be consistent not only within an individual game, but should also be consistent with the commands used in similar adventure games. This is especially true of World Builder games, where there is already a basic similarity of form and function. 
  9.  
  10. Although this may not apply to every possible game, in most cases certain command conventions should be adhered to. Otherwise you risk confusing and frustrating your players. 
  11.  
  12. For instance, in my early games I tried using the word "INFO" as a command for talking to non-player characters. But during testing I found that most players would enter the word "TALK" when they wanted to talk to another character. This happened even when I had instructions at the beginning of the game informing people of the "INFO" command. People either overlooked it, or forgot it. And since you are trying to talk to a character, "TALK" was the command people naturally attempted. 
  13.  
  14. In some games I've reviewed, the author has used keywords to trigger interaction between characters. The idea behind this is that the player will try to find out about certain plot elements, and will use those words. For instance, if the player has been told about a wizard who has something the player needs, the author expects the player to enter something like, "Ask about wizard" when he meets a bartender or other character. So the code is programmed to respond to the word "wizard."
  15.  
  16. The trouble with this is, the player often doesn't enter the right word or words. Perhaps the player doesn't know that this is how the conversation is supposed to be initiated. Or maybe the player asks for information using a different word or variation of the correct word. And again, in my experience the average player usually will enter something more like, "Talk to bartender." 
  17.  
  18. So obviously "TALK" should be the standard command for initiating conversations, at least in World Builder games. If you wish, you can also include alternate words, such as INFO or ASK, all in the same line of code. Here's an example of a conversation in World Builder, taken from my game, "A Mess O'Trouble":
  19.  
  20. IF{TEXT$=TALK}OR{TEXT$=INFO}OR{TEXT$=HELLO}OR{TEXT$=ASK}THEN
  21.     PRINT{.........................................}
  22.     IF{W8#<1}THEN
  23.         PRINT{USUR: "There is a magic sludgepit to the WEST. The elves have been dumping old magic potions, brews and elexirs there for centuries."}
  24.         PRINT{"In fact, this enchanted forest is the result of contamination from all that magic toxic waste!"}
  25.         LET{W8#=1}
  26.     EXIT
  27.     IF{W8#=1}THEN
  28.         PRINT{USUR: "In the Old Days, the elves used magic pellets to power many of their wondrous devices. But now even the elves don't remember how to make them."}
  29.         PRINT{"There are only a few left. I've got some, just a few that I've picked up in the forest over the years. About two bags full."}
  30.         LET{W8#=2}
  31.     EXIT
  32.     IF{W8#=2}THEN
  33.         PRINT{USUR: "You should always say the magic word when you see the symbol of a rocket."}
  34.         LET{W8#=3}
  35.     EXIT
  36.     IF{W8#=3}THEN
  37.         PRINT{USUR: "My cousin Smokey spent the winter with me last year and I darn near froze to death! Everytime I'd start a fire in the fireplace the idiot would pour water on it!"}
  38.         LET{W8#=4}
  39.     EXIT
  40.     IF{HAKO.BUTTON>STORAGE@}THEN
  41.         PRINT{USUR: "Well, I'm not supposed to tell you this, but there are 40 Maximum-Value Objects, not including the bonus items."}
  42.     EXIT
  43.     IF{HAKO.DOOR>STORAGE@}THEN
  44.         PRINT{USUR: "Here's a joke: What do you call a female tractor? A cowdozer!"}
  45.     EXIT
  46.     PRINT{USUR: "Sorry friend, I haven't heard anything new."}
  47. EXIT
  48.  
  49. In this example the player can "talk" to the character (a bear named Usur) several times, and get more information. The variable W8 is used to keep track of which responses have already been given. Each time a response is given, the variable is updated. When the character can't give any additional information, a default response is printed: "Sorry friend, I haven't heard anything new." 
  50.  
  51. A pair of additional IF/THEN statements allow for special responses later in the game. 
  52.  
  53. Notice too that the character speaking is always identified, and his comments are always in quotation marks. This makes it easier for the player to tell that he has been spoken to, and by whom. This is a standard that I highly recommend. 
  54. ----------------------------------------------
  55.  
  56. USING OBJECTS
  57.  
  58. Here is another place where standardization is sorely needed. I've played games where the command needed to use an object is DROP, hardly the verb that most players would think of first! Other games, including my first game, tend to have different action verbs for different objects. This also leads to confusion for the player. 
  59.  
  60. The simplest verb for handling actions is USE, and should be standard from game to game. And it allows you to program slightly more complex actions, where the player can USE one object with another. Here's an example:
  61.  
  62. IF{TEXT$=USE}OR{TEXT$=INSERT}OR{TEXT$=PUT}THEN
  63.     PRINT{........................................}
  64.     IF{TEXT$=MAGNET}THEN
  65.         IF{MAGNET>PLAYER@}THEN
  66.             PRINT{You don't have a magnet.}
  67.         EXIT
  68.         IF{M6#<1}THEN
  69.             PRINT{The electromagnet isn't powered.}
  70.         EXIT
  71.         IF{TEXT$=POT}OR{TEXT$=PLANT}OR{TEXT$=CAN}THEN
  72.             SOUND{CLINK}
  73.             SOUND{SLIDE.2}
  74.             MOVE{POT.1}TO{STORAGE@}
  75.             MOVE{POT.2}TO{STORAGE@}
  76.             MOVE{POT.3}TO{STORAGE@}
  77.             MOVE{POT.4}TO{STORAGE@}
  78.             MOVE{POT.5}TO{STORAGE@}
  79.             SOUND{PISTOL-COCKING.1}
  80.             MOVE{POT.6}TO{STORAGE@}
  81.             SOUND{PHAZE}
  82.             MOVE{GWDOOR.OPEN}TO{SCENE@}
  83.             PRINT{By putting the magnet against the glass, you drag the metal pot across the glass until it flips the switch, causing the glass door to open.}
  84.         EXIT
  85.         IF{TEXT$=SOCKET}OR{TEXT$=HOLE}OR{TEXT$=INSERT}THEN
  86.             PRINT{The magnet doesn't fit in the socket.}
  87.         EXIT
  88.         IF{TEXT$=LEVER}THEN
  89.             PRINT{The lever is unaffected by the magnet.}
  90.         EXIT
  91.         IF{TEXT$=WHEEL}THEN
  92.             PRINT{The wheel is on the far wall, too far away for the magnet to have any effect on it.}
  93.         EXIT
  94.         IF{TEXT$=DOOR}THEN
  95.             IF{GWDOOR.OPEN>SCENE@}THEN
  96.                 PRINT{The glassy door is unaffected by the magnet.}
  97.             EXIT
  98.             PRINT{The door on the far wall is unaffected by the magnet.}
  99.         EXIT
  100.         PRINT{What do you want to use the magnet with?}
  101.     EXIT
  102.     IF{TEXT$=FORK}THEN
  103.         IF{FORK=PLAYER@}THEN
  104.             IF{GWDOOR.OPEN=SCENE@}THEN
  105.                 MOVE{FORK}TO{STORAGE@}
  106.                 MOVE{GFORK.1}TO{SCENE@}
  107.                 SOUND{SNIP.2}
  108.                 PRINT{The fork fits the socket perfectly, and becomes locked in place.}
  109.             EXIT
  110.             PRINT{The fork looks like it might fit the socket, but you can't reach the socket with the glass door closed.}
  111.         EXIT
  112.         PRINT{You don't have a fork.}
  113.     EXIT
  114.     IF{TEXT$=INSERT}THEN
  115.         PRINT{That doesn't fit in the socket.}
  116.     EXIT
  117. END
  118.  
  119. This is a fairly complex example. There are several possible actions and variations that the player might try, and for every one of them there is an appropriate response. 
  120.  
  121. The scene shows a room divided by an unbreakable glass wall. There is a glass door in the wall. On the other side of the glass, in the far wall, is another door, and beside it is a socket. On the floor near the glass is a lever, and a potted plant. The pot is made of iron or steel. To solve the puzzle, the player must use an electromagnet (taken from a nearby scene) to move the potted plant, tripping the lever which opens the glass door. Then the player must use a Data Fork in the socket, to open the inner door. For simplicity, the Data Fork object is just named "fork".
  122.  
  123. If the player enters USE and MAGNET, then the code checks to see if the player has the magnet. If he does, then the code checks to see if the player has specified what he wants to use the magnet with. If the player has entered either POT, PLANT or CAN, then the program performs the required action. If the player has entered the name of one of the other objects in the scene, then a response is printed telling the player that the magnet doesn't work with that particular object. If the player has only entered USE MAGNET, then the player is asked to be more specific: "What do you want to use the magnet with?" 
  124.  
  125. Because some players might enter something like "PUT THE FORK IN THE SOCKET" or "INSERT THE FORK IN THE SOCKET," I've included the verbs PUT and INSERT as alternatives to USE. 
  126.  
  127. Also, in my Global Code I have a default response for the verb USE. This response is printed any time the player attempts to use something unusual to solve a puzzle. For instance, if the player enters "USE SCREWDRIVER WITH SOCKET" the default response comes up: "That doesn't seem to work." This reduces the amount of code needed in each scene. 
  128.  
  129. DEFAULT RESPONSES
  130. This brings up another point: Every common command used in the game should have some kind of default response to handle the times when the player tries to do something you didn't think of! Sure, World Builder has a default response "hard-wired" into it, but reading "Huh?" everytime you try to do something turns players off. In most cases there should be a response that tells the player that he can't do what he is attempting, or gives a reason why he can't do it. 
  131.  
  132. Here are some of the Global default responses I use:
  133.  
  134. IF{TEXT$=WRITE}OR{TEXT$=DRAW}THEN
  135.     PRINT{You don't have a pen or pencil.}
  136. EXIT
  137. IF{TEXT$=THANKS}OR{TEXT$=THANK YOU}THEN
  138.     PRINT{"You're welcome!"}
  139. EXIT
  140. IF{TEXT$=HAKO}THEN
  141.     PRINT{Nothing happens.}
  142. EXIT
  143. IF{TEXT$=TURN}OR{TEXT$=TWIST}THEN
  144.     PRINT{You can't turn that.}
  145. EXIT
  146. IF{TEXT$=DIG}THEN
  147.     PRINT{You can't dig here.}
  148. EXIT
  149. IF{TEXT$=MOVE}OR{TEXT$=PUSH}OR{TEXT$=LIFT}OR{TEXT$=PULL}THEN
  150.     PRINT{You can't move that.}
  151. EXIT
  152. IF{TEXT$=SEARCH}THEN
  153.     PRINT{You find nothing unusual.}
  154. EXIT
  155. IF{TEXT$=INSPECT}OR{TEXT$=EXAMINE}THEN
  156.     PRINT{Click on the things you want to examine.}
  157. EXIT
  158. IF{TEXT$=OPEN}THEN
  159.     IF{TEXT$=CAN}THEN
  160.         PRINT{You need to use a can opener.}
  161.     EXIT
  162.     PRINT{You can't open anything here.}
  163. EXIT
  164. IF{TEXT$=CLOSE}THEN
  165.     PRINT{You can't close anything here.}
  166. EXIT
  167. IF{TEXT$=ENTER}THEN
  168.     PRINT{You can't enter anything here.}
  169. EXIT
  170. IF{TEXT$=EXIT}THEN
  171.     PRINT{You can't exit anything here.}
  172. EXIT
  173. IF{TEXT$==UP}THEN
  174.     PRINT{You can't go up here.}
  175. EXIT
  176. IF{TEXT$=DOWN}THEN
  177.     PRINT{You can't go down here.}
  178. EXIT
  179. IF{TEXT$=DRINK}THEN
  180.     PRINT{..................................}
  181.     IF{CANTEEN=PLAYER@}THEN
  182.         IF{W1#>0}THEN
  183.             LET{W1#=W1#-1}
  184.             SOUND{DROWNING.1}
  185.             PRINT{The water in the canteen relieves your thirst.}
  186.             LET{H2#=90}
  187.             IF{W1#=0}THEN
  188.                 PRINT{The canteen is now empty.}
  189.             EXIT
  190.         EXIT
  191.         PRINT{Your canteen is empty.}
  192.     EXIT
  193.     PRINT{Drink what?}
  194. EXIT
  195. IF{TEXT$=EAT}OR{TEXT$=TASTE}THEN
  196.     PRINT{..................................}
  197.     IF{TEXT$=FOOD}THEN
  198.         IF{FOOD=PLAYER@}THEN
  199.             SOUND{CHEWING.1}
  200.             SOUND{BELCH.2}
  201.             PRINT{The food is filling.}
  202.             LET{H1#=95}
  203.             MOVE{FOOD}TO{STORAGE@}
  204.         EXIT
  205.         PRINT{You don't have any food.}
  206.     EXIT
  207.     PRINT{Eat what?}
  208. EXIT
  209. IF{TEXT$=HELP}THEN
  210.     SOUND{SINISTER LAUGH}
  211.     PRINT{RAY: "Surely you jest! You're on your own here."}
  212. EXIT
  213. IF{TEXT$=READ}THEN
  214.     PRINT{..................................}
  215.     IF{TEXT$=MAP}THEN
  216.         IF{MAP=PLAYER@}THEN
  217.             MOVE{MAP.1}TO{SCENE@}
  218.             PRINT{To stop, click on the map.}
  219.         EXIT
  220.         PRINT{You don't have a map.}
  221.     EXIT
  222.     PRINT{Read what?}
  223. EXIT
  224. IF{TEXT$=SHOOT}THEN
  225.     PRINT{You can't shoot that.}
  226. EXIT
  227. IF{TEXT$=KILL SELF}OR{TEXT$=SUICIDE}THEN
  228.     PRINT{You can't get out of this that easily!}
  229. EXIT
  230. IF{TEXT$=HIT}OR{TEXT$=BREAK}THEN
  231.     PRINT{You can't break that.}
  232. EXIT
  233.  
  234. All of these are things that players WILL try to do somewhere in almost every adventure game. All of the commands listed here are used by players often enough that they should be considered standard. And you may need others that apply to specific situations in your game. 
  235.  
  236. Some default responses can be handled better in scene code, especially when it is something that applies only to a specific situation in a scene.
  237.  
  238. Also, although it isn't strictly necessary, I usually like to have a default response for those times when the player gets mad enough to swear at the game, or at a character in the game. 
  239. -------------------------------------------------
  240.  
  241. STANDARDIZING WINDOWS
  242.  
  243. Your scene and text windows should remain the same throughout your game, only changing size and/or shape when absolutely necessary. I've played a lot of games where the windows change size, or move around the screen, almost every time you enter a scene. This looks unprofessional, and is annoying to most players.
  244.  
  245. Also, in World Builder the windows are automatically set so that the text window is shorter than the scene window. This doesn't leave you much room for text, especially in scenes where the player is conversing with another character. To get the most from the text window, stretch it so that it is as tall as the scene window. Also, you can widen it a little too, and make the two windows touch. But don't overlap them! Once you have done this on the first scene, before adding any text or drawings, copy the entire room and then paste it as many times as needed for your game. This will insure that all your scenes are exactly the same size and position.
  246.  
  247. There is another reason for keeping your windows the same throughout the game. If the windows are always the same, it will take less time when the player moves from one scene to another.